package com.tuanzi.loan.business.service.system;

import java.util.List;

import com.tuanzi.loan.business.entity.system.DataPermissionRelation;
import com.tuanzi.loan.business.entity.system.RelationType;
import com.tuanzi.loan.core.service.BaseAuditService;

/**
 * @author Ray 2017/09/21
 */
public interface DataPermissionRelationService extends
        BaseAuditService<DataPermissionRelation, String> {

    DataPermissionRelation relate(String permissionId, RelationType relationType, String relationId);

    void unrelate(String permissionId, RelationType relationType, String relationId);

    List<DataPermissionRelation> findAllByRelationId(String relationId);

    List<DataPermissionRelation> batchRelate(List<String> permissionIds, RelationType relationType,
            String relationId);

}